import axios from '../AxiosConfig.js'

export const createView = data => {
  return axios({
    method: 'post',
    url: '/api/manage/view',
    data: data
  })
}

export const deleteView = ukId => {
  return axios({
    method: 'delete',
    url: '/api/manage/view',
    params: {"ukId": ukId}
  })
}

export const updateView = data => {
  return axios({
    method: 'put',
    url: '/api/manage/view',
    data: data
  })
}

export const listView = (name) => {
  return axios({
    method: 'get',
    url: '/api/manage/view/list',
    params: {"name": name}
  })
}

export const listViewTree = (parentUkId) => {
  return axios({
    method: 'get',
    url: '/api/manage/view/list/tree',
    params: {"parentUkId": parentUkId}
  })
}


